From 85c024b331ec621ac4761812392bb08614a2e163 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Sat, 1 Apr 2006 10:49:42 +0100 Subject: [PATCH] Fix makefiles for hvmloader and vmxassist for FC5 on x86_64 systems. In FC5, gcc has issues with the command lines used to build hvmloader and vmxassist. Basically, the compiler doesn't like the combination of -m64 and -m32. As these are 32 bit apps, and intended to be, take a modified approach and simply define XEN_TARGET_ARCH for 32 bits. This cleans up the command line and builds the images correctly. From: Ben Thomas Signed-off-by: Keir Fraser --- tools/firmware/hvmloader/Makefile | 4 ++-- tools/firmware/vmxassist/Makefile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/firmware/hvmloader/Makefile b/tools/firmware/hvmloader/Makefile index ff95836e90..5a821f7dcb 100644 --- a/tools/firmware/hvmloader/Makefile +++ b/tools/firmware/hvmloader/Makefile @@ -21,6 +21,7 @@ # External CFLAGS can do more harm than good. CFLAGS := +XEN_TARGET_ARCH = x86_32 XEN_ROOT = ../../.. include $(XEN_ROOT)/Config.mk @@ -38,8 +39,7 @@ CFLAGS += $(call test-gcc-flag,$(CC),-fno-stack-protector) CFLAGS += $(call test-gcc-flag,$(CC),-fno-stack-protector-all) OBJCOPY = objcopy -CFLAGS += $(DEFINES) -I. $(XENINC) -Wall -fno-builtin -O2 -msoft-float -CFLAGS += -m32 -march=i686 +CFLAGS += $(DEFINES) -I. $(XENINC) -fno-builtin -O2 -msoft-float LDFLAGS = -m32 -nostdlib -Wl,-N -Wl,-Ttext -Wl,$(LOADADDR) all: hvmloader diff --git a/tools/firmware/vmxassist/Makefile b/tools/firmware/vmxassist/Makefile index aabd32cc1a..85c9fff581 100644 --- a/tools/firmware/vmxassist/Makefile +++ b/tools/firmware/vmxassist/Makefile @@ -21,6 +21,7 @@ # External CFLAGS can do more harm than good. CFLAGS := +XEN_TARGET_ARCH = x86_32 XEN_ROOT = ../../.. include $(XEN_ROOT)/Config.mk @@ -37,8 +38,7 @@ CFLAGS += $(call test-gcc-flag,$(CC),-fno-stack-protector-all) CPP = cpp -P OBJCOPY = objcopy -p -O binary -R .note -R .comment -R .bss -S --gap-fill=0 -CFLAGS += $(DEFINES) -I. $(XENINC) -Wall -fno-builtin -O2 -msoft-float -CFLAGS += -m32 -march=i686 +CFLAGS += $(DEFINES) -I. $(XENINC) -fno-builtin -O2 -msoft-float LDFLAGS = -m elf_i386 OBJECTS = head.o trap.o vm86.o setup.o util.o -- 2.30.2